package com.linkhub.oms.admin.modules.stock.domain.dto;

import com.linkhub.oms.entity.EntryOrderLineEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @Description: EntryOrderPassageStockDTO
 * @Author: echo
 * @Date: 2024/5/7 20:15
 * @Version: 1.0
 */
@Data
public class PassageStockDTO implements Serializable {


    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "本地商品skuId")
    private String skuId;

    @ApiModelProperty(value = "数量")
    private Integer skuQuantity;

    @ApiModelProperty(value = "供应商id")
    private Long supplierId;

    @ApiModelProperty(value = "仓库")
    private String stashName;

    @ApiModelProperty(value = "入库单号")
    private String inboundNo;

    @ApiModelProperty(value = "入库时间")
    private String inboundTime;

    @ApiModelProperty(value = "创建人")
    private String creator;

    public static PassageStockDTO convert(String userId, EntryOrderLineEntity orderLine) {
        PassageStockDTO dto = new PassageStockDTO();
        dto.setUserId(userId);
        dto.setSkuId(orderLine.getSkuId());
        dto.setSkuQuantity(orderLine.getSkuQuantity());

        return dto;

    }


}
